package cn.edu.gdu.quizpractice.service;

import cn.edu.gdu.quizpractice.entity.ChoiceQuestion;
import cn.edu.gdu.quizpractice.entity.PageBean;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;


public interface IChoiceQuestionService extends IService<ChoiceQuestion> {

    List<ChoiceQuestion> findByCategory_Id(Integer categoryId);

    List<ChoiceQuestion> findByDifficulty(Integer difficulty);

    List<ChoiceQuestion> findAll();

    void saveQuestionsFromExcel(List<ChoiceQuestion> questions);

    PageBean<ChoiceQuestion> findByPage(Integer pageNum, Integer pageSize, String categoryName);

    boolean updateQuestion(ChoiceQuestion question);

    boolean addQuestion(ChoiceQuestion question);

    boolean deleteByBankId(Integer bankId);

    int deleteQuestionById(Integer id);
}